package n.info.entities;

public class FeedItem extends FeedElement{

	// ~ constants .................................................................................
	// ~ Static fields/initializers .............................................................
	// ~ Static methods ........................................................................
	// ~ Instance fields .........................................................................

	//Optional
	private FeedMedia enclosure ;
	
	// ~ Constructors ...........................................................................
	
	public FeedItem(){
		
	}
	
	public FeedItem(String title, String description, String link) {
	    super(title, description, link);
    }
	
	// ~ Properties ...............................................................................
	
	public FeedMedia getEnclosure() {
	    return enclosure;
    }

	public void setEnclosure(FeedMedia enclosure) {
	    this.enclosure = enclosure;
    }
	
	// ~ Abstract methods ...................................................................
	// ~ Abstract methods implementations .......................................
	// ~ Interface implementations ......................................................
	// ~ Methods ..................................................................................	
	
	public FeedItem copy(){
		FeedItem copy = new FeedItem() ;
		copy.setDescription(this.getDescription());
		copy.setLink(this.getLink());
		copy.setTitle(this.getTitle());
		copy.setEnclosure(this.getEnclosure());
		
		return copy ;
	}
	
	public void erase(){
		setDescription(null);
		setEnclosure(null);
		setLink(null);
		setTitle(null);
	}
	
	// ~ Inner classes ...........................................................................
}
